package net.courier.remoting.client;

import java.lang.reflect.Method;

import net.courier.remoting.protocol.RequestDatagram;

public class RequestDatagramParser {
	public static RequestDatagram parseRequestInfo(String id, Method method, Object[] arguments) {
		RequestDatagram datagram = new RequestDatagram();
		datagram.setId(id);
		datagram.setMethodName(method.getName());
		datagram.setParameterTypes(method.getParameterTypes());
		datagram.setArguments(arguments);
		return datagram;
	}
}
